import { HttpClient } from '@angular/common/http';
import { Injectable } from '@angular/core';
import {Subject} from "rxjs/Subject";

/*
  Generated class for the MyProvider provider.

  See https://angular.io/guide/dependency-injection for more info on providers
  and Angular DI.
*/
@Injectable()
export class MyProvider {

  constructor(public http: HttpClient) {
    console.log('Hello MyProvider Provider');
  }

  tabBroadcast:Subject<number> = new Subject<number>();

  tabIndex:number = 1;
  orderTab;
  //发广播
  sendTabBroadcast(id:number){
    this.tabIndex = id;
    this.tabBroadcast.next(id);
  }

}
